﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;

namespace Tilver.ConsoleTest.Xml
{
    #region 序列化对象
    [Serializable]
    public class DataBase
    {
        [XmlIgnore]
        public DataProject Project { get; set; }
        public string Name { get; set; }
        public string Code { get; set; }
        public List<DataTable> Tables { get; set; }
    }
    [Serializable]
    public class DataObjectBase
    {
        [XmlIgnore]
        public DataBase DataBase { get; set; }
        public string Name { get; set; }
    }
    [Serializable]
    public class DataTable : DataObjectBase
    {

    }
    [Serializable]
    public class DataView : DataObjectBase
    {

    }
    [Serializable]
    public class DataProject
    {
        /// <summary>
        /// 项目名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 创建者姓名
        /// </summary>
        public string Author { get; set; }

        /// <summary>
        /// 命名空间
        /// </summary>
        public string NameSpace { get; set; }

        /// <summary>
        /// 生成的代码保存位置
        /// </summary>
        public string SaveDirectory { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateDate { get; set; }

        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime ModifyDate { get; set; }

        /// <summary>
        /// 数据库
        /// </summary>
        public List<DataBase> DataBases { get; set; }
    }
    #endregion
}
